﻿<usr:UserControlBase x:Class="WPF.TestEditor.Controls.BrowsersSelector"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:wb="EasyStep.Business.Interfaces"             
             xmlns:usr="clr-namespace:WPF.TestEditor.Controls"
             mc:Ignorable="d">   
    <Grid VerticalAlignment="Center" HorizontalAlignment="Right">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>            
            <ColumnDefinition Width="auto"/>
        </Grid.ColumnDefinitions>
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
            <ItemsControl Name="BrowsersList" ItemsSource="{Binding Path=.}" Style="{DynamicResource BrowserThumbnailTemplate}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" ToolTip="{Binding Path=Name}" Style="{DynamicResource BrowserThumbnailTemplateItem}">
                            <CheckBox Click="CheckBox_Checked"  Margin="0 4 -2 0" Tag="{Binding Path=.}" Style="{DynamicResource MetroCheckBox}"/>
                            <Image Mouse.MouseUp="Image_MouseUp" Source="{Binding Path=Icon}" Image.ImageFailed="Image_ImageFailed" ToolTip="{Binding Path=Name}" Width="20" Height="20"  Margin="0 0 20 0"/>
                        </StackPanel>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </ScrollViewer>
        <Button  Grid.Column="2" Content="Run" ToolTip="excecute test" Name="ttbExecuteTest"  Style="{DynamicResource MetroButton}" Click="ttbExecuteTest_Click" />
        <Button  Grid.Column="2" Content="Stop" ToolTip="stop test execution" Name="ttbStopTest"  Style="{DynamicResource MetroButton}" Click="ttbStopTest_Click" Visibility="Collapsed"/>
    </Grid>
</usr:UserControlBase>
